Skip to content

ci: fix job-level CONAN_HOME (runner.temp invalid at job-env → 0 jobs) - #704

Merged
frstrtr merged 2 commits into
masterfrom
ci-steward/fix-conan-home-runner-context
Jul 14, 2026
Merged

ci: fix job-level CONAN_HOME (runner.temp invalid at job-env → 0 jobs)#704
frstrtr merged 2 commits into
masterfrom
ci-steward/fix-conan-home-runner-context

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Regression fix — CI + release have been dark since #700/#702 merged.

Root cause

#700 (build.yml) and #702 (release.yml) set CONAN_HOME: ${{ runner.temp }}/conan2 at job-level env:. The runner context does not exist at job-env parse time (step scope only), so GitHub rejects the workflow: Unrecognized named-value: runner. Effect (confirmed live):

  • workflow_dispatch on release.yml → HTTP 422 "failed to parse workflow".
  • push runs of build.yml + release.yml materialize zero jobs, marked failure at 0s (runs 29358330561 / 29358331142).
  • The v0.2.1 re-tag produced no release run because the workflow cannot parse.

Fix

Drop the job-level env: CONAN_HOME in all 3 affected jobs (build.yml linux, release.yml linux + windows) and export it in an early step via $GITHUB_ENV where RUNNER_TEMP is valid (PowerShell Out-File on Windows). Per-job/per-cell Boost cache isolation is preserved; the exported path matches the existing step-level cache path:.

Verified

  • both files parse (python yaml.safe_load).
  • no job-level runner.temp remains (only comments + step-level cache path:, both valid at step scope).
  • 3 $GITHUB_ENV exports present (build-linux bash, release-linux bash, release-windows pwsh).

Follow-up (non-blocking, per integrator): release macos/macos-universal/checksums and build.yml other coin jobs use shared ~/.conan2 and are still flake-exposed — add the same isolation step-set separately.

Signed b4ba979. No self-merge — integrator review + operator tap.

frstrtr added 2 commits July 14, 2026 18:51
runner.temp is only valid at step scope; setting CONAN_HOME as job-level env made build.yml + release.yml fail to parse -> zero jobs materialized (CI + release dark since #700/#702). Export it in an early step via $GITHUB_ENV (PowerShell Out-File on Windows) where RUNNER_TEMP is valid. Per-job/per-cell Boost cache isolation preserved; path matches the step-level cache.
…flows

Fold the runner.temp parse-fix into one CI-repair pass: convert every
conan-building workflow that was still on the shared ~/.conan2 pattern
(the root cause of the Boost 1.90.0 torn-cache flakes, e.g. b2/5.5.1
recipe loss) to the isolated per-job home used by build.yml/release.yml.

Workflows (7): bch-gate-g3a, bch-gate-g3b, dash-gate-g1, dash-gate-g3a,
dgb-phase-b-smoke, coin-matrix, codeql-analysis
  - add early step exporting CONAN_HOME=$RUNNER_TEMP/conan2 via GITHUB_ENV
    (runner.temp is step-scope only; job-level env fails to parse)
  - drop conan profile detect --force + cppstd sed; use committed
    ci/conan/linux-gcc13.profile
  - cache path -> runner.temp/conan2; key scoped by profile + conan.lock

Gate scripts (5): bch_g3a, bch_g3b, dgb_phase_b_smoke, g1_byte_parity_kat,
g3a_regtest_block_production
  - conan install now pins -pr:a=<profile> --lockfile=conan.lock
@frstrtr
frstrtr merged commit 884a0ae into master Jul 14, 2026
25 of 27 checks passed
frstrtr added a commit that referenced this pull request Jul 19, 2026
…te lanes

The Conan cache-lock flake is not CodeQL-specific. Job 88179349495
(Coin matrix / ltc smoke) and 88188892260 (CI / Linux x86_64) fail the
same way: actions/cache reports a hit, the restore of the multi-hundred-MB
conan2 tree onto VM905 then times out ("Failed to restore: The operation
cannot be completed in timeout"), the home is left empty, and all eight
runners fall into a simultaneous cold from-source rebuild whose I/O storm
blows the 20s sqlite lock timeout ("Conan failed to acquire database lock").

Apply the same three-part fix everywhere the pattern appears:

  * CONAN_HOME on self-hosted becomes $HOME/.conan2-ci/$RUNNER_NAME --
    persistent, so the cache-service restore is off the hot path, and
    keyed on the runner instance, which executes one job at a time, so it
    is never contended and keeps the per-job isolation of #704/#710.
    github-hosted forks keep RUNNER_TEMP/conan2 + actions/cache unchanged.
  * actions/cache conan2 steps are gated to runner.environment ==
    github-hosted.
  * conan install gets a bounded 3x retry; remote downloads are the only
    network step left.

Also scopes coin-matrix orphaned-tempfile cleanup to $CONAN_HOME instead
of the shared ~/.conan2, which it was mutating out from under peer jobs,
and repoints the CodeQL home from .conan2-codeql to the same per-runner
path (that one was still shared across runners on concurrent refs).

Windows (VM217) lanes are untouched: no restore flake reported there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant